<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>temperature</title>
</head>

<body>
<div>
<table align="center" style="background-image:url(images/summer.jpg); background-position:center; width:1200px; height:800px">
<tr>
<td>
<span id="demo" style="font-family:'Times New Roman', Times, serif; font-size:76px; width:100%; height:100%">22</span>
</td>
</tr>
</table>
</div>
<script>

function updateView()
{

    timer = setInterval(function() {

        var xmlhttp;
        xmlhttp=new XMLHttpRequest();
        xmlhttp.onreadystatechange=function() {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                var cur = parseFloat(xmlhttp.responseText);
		if (!isNaN(cur))
			document.getElementById("demo").innerHTML=cur;
            }
        }
	xmlhttp.open("GET","temper.php?date="+ new Date().toTimeString(),true);
        xmlhttp.send();
    }, 10);
}

window.onload = function() {
    updateView();
}
</script>
</body>
</html>
